package org.liveboardgames.agricola.control.delegates
{
    import flash.utils.setTimeout;
    
    import org.liveboardgames.agricola.model.AgricolaModelLocator;
    import org.liveboardgames.agricola.vo.Game;
    
    import mx.rpc.IResponder;
    
    public class ActionCompleteDelegate
    {
        private var _responder:IResponder;
        
        private var _service:Object;
        
        public function ActionCompleteDelegate(responder:IResponder)
        {
            // this.service = ServiceLocator.getInstance().getRemoteObject( "helloWorldService" );
            this._responder = responder;
        }
        
        public function completeAction(game:Game):void
        {
            setTimeout(completeActionService, 0, game);
        }
        
        private function completeActionService(game:Game):void
        {
            // Check that the current player has played its peep
            if (game.hasPlayerPlayedPeep)
            {
                //AgricolaModelLocator.getInstance().workflowState = AgricolaModelLocator.ACTION_PLAYED_STATE;
            }
        
            //_responder.result(newData);
        }
    }
}